Digital 2d holographic spectrometer for material characterization

ABSTRACT

A tool including a dispersive spectrometer deployable within a wellbore is provided. The dispersive spectrometer includes a waveguide layer to detect electromagnetic radiation according to wavelength. The dispersive spectrometer also includes a plurality of detector elements disposed along the waveguide layer to detect electromagnetic radiation associated with a portion of the wavelength of the electromagnetic radiation. A method for using the tool in a subterranean application is also provided.

BACKGROUND

In the field of oil and gas exploration and production, materialcharacterization such as reservoir or wellbore fluid composition isdesirable to determine the quality of a product or the condition of acontainer, a wellbore, or a pipeline. Current dispersive spectrometersfor material characterization operate in the near-infrared (NIR) over alimited wavelength range with a small number of channels (typicallyabout 16) and with relatively low spectral resolution.

To increase spectral resolution, traditional dispersive spectrometersuse narrow slit apertures to convey electromagnetic radiation in and outof the spectrometer. This reduces the signal-to-noise ratio (SNR),thereby deteriorating measurement quality and increasing measurementcollection times to compensate for quality degradation. In someapproaches, the length of the dispersive spectrometer is increased toachieve a desirable resolution. However, this design strategy hinderscompactness and the ability to co-locate the device with the fluid inthe reservoir or wellbore. Some traditional dispersive spectrometers mayfit in spaces as small as a few inches per side and have been utilizedin downhole fluid characterization. However, the size of these devicesis still too large for use in more demanding configurations such aspermanent downhole sensors.

BRIEF DESCRIPTION OF THE DRAWINGS

The following figures are included to illustrate certain aspects of thepresent invention, and should not be viewed as exclusive embodiments.The subject matter disclosed is capable of considerable modifications,alterations, combinations, and equivalents in form and function, as willoccur to those skilled in the art and having the benefit of thisdisclosure.

FIG. 1 illustrates an optical analysis device for use in the oil and gasindustry.

FIG. 2 illustrates a tool including an optical analysis device attachedto an integrated characterization section (ICS) in a flow line for awellbore application.

FIG. 3 illustrates a tool including an optical analysis device attachedto a fluid identification (FLID) section for a wellbore application.

FIG. 4A illustrates a tool string including an optical analysis devicefor a wellbore application.

FIG. 4B illustrates a tool string including an optical analysis devicefor a wellbore application.

FIG. 5 illustrates a tool including an optical analysis device attachedto an enhanced probe section (EPS) for wellbore applications.

FIG. 6 illustrates an intelligent well completion (IWC) system includinga plurality of optical analysis devices attached to a probe.

FIG. 7 illustrates a tool including a plurality of self-containedoptical analysis devices removably attached to a probe.

FIG. 8 illustrates a tool including a plurality of optical analysisdevices attached to a probe.

FIG. 9 illustrates a plurality of optical analysis devices linked in anetwork for distributed sensing.

FIG. 10 illustrates a drilling system configured to use a calibratedoptical sensor for modifying a drilling parameter inmeasurement-while-drilling (MWD) and logging-while-drilling (LWD)operations.

FIG. 11 illustrates a wireline system configured to use a calibratedoptical sensor during formation testing and sampling.

FIG. 12 illustrates a flow chart of steps in a method for adjusting awellbore operation or a storage procedure based on a measurementprovided by an optical analysis device attached to a probe in a tool.

In the figures, elements or steps having the same or similar referencenumerals have the same or similar description and configuration, unlessstated otherwise.

DETAILED DESCRIPTION

The present disclosure relates to measuring characteristics of materialspresent within a wellbore, a pipeline or a reservoir storage for the oiland gas industry.

In the oil and gas industry, it is desirable to collect optical spectrafor analysis and characterization of the different materials and samplescommonly encountered in oil and gas production. It is desirable that thespectra be collected in-situ and in real-time, over extended periods andover extended geographic regions and geological formations such asrocks, sands, sediments and the like. Some examples of characterizationof materials may include a gas-oil-ratio (GOR) and a methaneconcentration of a hydrocarbon product in a wellbore, a pipeline, or areservoir. Some examples of reservoir or pipeline conditions to bemeasured include wax or scale deposition built-up on the inner surfaceof the container or pipeline, including hydrates, minerals, corrosion,and bacteria.

Embodiments consistent with the present disclosure involve thecollection of a spectrum of electromagnetic radiation as interacted witha sample substance. The spectrum is obtained with a dispersive elementformed by discrete patterns etched on a two-dimensional (2D) waveguidelayer of an optical analysis device. The optical analysis deviceincludes a substrate layer that supports the 2D waveguide layer andfurther includes a processor and a memory. The obtained spectrum may bestored in the memory and provided to an operator for data analysis at adifferent time and location from where the spectrum was obtained. Asuitably calibrated multivariate processing algorithm may be used todetermine a characteristic of interest of the sample based on theobtained spectrum.

In some embodiments, the discrete patterns etched on a 2D waveguidelayer include trenches having a pre-determined thickness and apre-determined depth, but different length and orientation along theplane of the 2D waveguide layer. In these embodiments, the discretepatterns form a “digital” profile on the 2D waveguide layer, and thedispersion of a propagating electromagnetic radiation forms a spectrumalong an edge of the 2D waveguide layer. The details of the spectrumdepend on the orientation of the edge relative to the direction ofpropagation of the electromagnetic radiation. Thus, the spectrum forms ahologram enabling arbitrary discrete spectral and spatial signalarrangement and distribution. Accordingly, such 2D waveguide layers areknown as 2D digital planar hologram (DPH) spectrometers. DPHspectrometers offer a small form factor, low power consumption,relatively high resolution, and a large number of optical channelscompared to other dispersive spectrometers commonly used in the art. Useof DPH spectrometers for an optical analysis device in oil and gasexploration and production as disclosed herein allows real-time, in-situmaterial characterization such as wellbore and reservoir fluidcomposition, or a container and pipeline condition. In some embodiments,DPH spectrometers include up to 500-1000 channels over the visible (VIS,400 nm-750 nm) and NIR (750 nm-2500 nm) spectral ranges and providespectral resolution from about 0.15 nm to about 0.18 nm.

In some embodiments, the trenches are formed along the surface of 2Dwaveguide layer with well-known thin film fabrication and etchingtechnologies. Thus, combining the flexibility and control of holographywith the manufacturability of current thin film technologies,embodiments in this disclosure may be used in low power, small, easilydeployed, and inexpensive optical analysis devices. Optical analysisdevices as disclosed herein may operate with no slits, having inherentlyhigher SNR than slit-based dispersive spectrometers of comparabledimensions.

Embodiments consistent with the present disclosure help facilitate thecollection of raw spectral data, thus relaxing calibration steps and theneed for an extended calibration database. In that regard, devices andmethods consistent with the present disclosure provide measurements thatare more tolerant to drastic changes in sample conditions, provided thespectral bandwidth of the optical response of the new sample ismaintained within the spectral bandwidth of the DPH spectrometer.Consequently, the need to interpolate or extrapolate a response changefrom the sample using calibrated data points may be generally avoided.

As used herein, the term “characteristic” refers to a chemical,mechanical, or physical property of a substance. A characteristic of asubstance may include a quantitative or qualitative value of one or morechemical constituents or compounds present therein, or any physicalproperty associated therewith. Such chemical constituents and compoundsmay be referred to herein as “analytes.” Illustrative characteristics ofa substance that can be monitored with the optical computing devicesdescribed herein include, for example, chemical composition (e.g.,identity and concentration in total or of individual components), phasepresence (e.g., gas, oil, water, etc.), impurity content, pH,alkalinity, viscosity, density, ionic strength, total dissolved solids,salt content (e.g., salinity), porosity, opacity, bacteria content,total hardness, combinations thereof, state of matter (solid, liquid,gas, emulsion, mixtures), and the like.

As used herein, the term “electromagnetic radiation” refers to radiowaves, microwave radiation, infrared and near-infrared radiation,visible light, ultraviolet light, X-ray radiation and gamma rayradiation. As used herein, the term “optically interact” or variationsthereof refers to the reflection, transmission, scattering, diffraction,or absorption of electromagnetic radiation either on, through, or fromone or more processing elements or a substance being analyzed by theprocessing elements. Accordingly, optically interacted light refers toelectromagnetic radiation that has been reflected, transmitted,scattered, diffracted, or absorbed by, emitted, or re-radiated, forexample, using a processing element, but may also apply to interactionwith a substance.

In a first embodiment, a tool includes a probe configured to be deployedin a wellbore, and an optical analysis device attached to the probe. Theoptical analysis device includes a 2D waveguide layer configured totransmit and to disperse electromagnetic radiation according towavelength. The 2D waveguide layer may include a plurality of detectorelements disposed along an edge of the 2D waveguide layer so that eachdetector element provides a signal associated with a pre-determinedwavelength portion of the electromagnetic radiation. The opticalanalysis device also includes a substrate layer that includes aprocessor and a memory. The substrate layer may be electrically coupledwith the 2D waveguide layer to receive the signal from each of thedetector elements and form a spectrum of the electromagnetic radiationwith the processor.

In a second embodiment, a method includes deploying a probe in awellbore or a reservoir. The probe includes an optical analysis device,which includes a 2D waveguide layer configured to transmit and dispersean electromagnetic radiation according to wavelength. The method alsoincludes adjusting a depth of measurement for the probe and obtaining aspectrum with the optical analysis device at a specified depth. In someembodiments, the method further includes obtaining a characteristic ofat least one of a fluid, a formation in the wellbore, or a container inthe reservoir. In some embodiments, the method includes adjusting awellbore operation or a reservoir storage based on the characteristic ofat least one of the fluid, the formation in the wellbore, or thecontainer in the reservoir.

In a third embodiment, a non-transitory, computer readable medium storescommands which, when executed by a processor in a tool, cause the toolto perform a method. The method includes deploying a probe in a wellboreor a reservoir. The probe includes an optical analysis device having a2D waveguide layer configured to transmit and disperse anelectromagnetic radiation according to wavelength. The method furtherincludes adjusting a depth of measurement for the probe and obtaining aspectrum with the optical analysis device at a specified depth. Themethod may further include obtaining a characteristic of at least one ofa fluid, a formation in the wellbore, or a container in the reservoir.In some embodiments, the method includes adjusting a wellbore operationor a reservoir storage based on the characteristic of at least one ofthe fluid, the formation in the wellbore, or the container in thereservoir. In some embodiments, adjusting the wellbore operation or thereservoir storage includes modifying a fluid in the wellbore or in thereservoir.

FIG. 1 illustrates an optical analysis device 100 for use in the oil andgas industry. Optical analysis device 100 includes a 2D waveguide layer101 configured to transmit and disperse electromagnetic radiation 105according to wavelength. Electromagnetic radiation 105 propagates from asample 150 following optical interaction with the sample 150, where thesample 150 may be a fluid in a wellbore, a reservoir or a pipeline, ormay alternatively be a solid component forming part of or disposed on awellbore wall, a pipeline, or a container. Two-dimensional waveguidelayer 101 includes a plurality of detector elements 110 disposed alongan edge 125 so that each detector element 110 provides a signalassociated with a pre-determined wavelength portion of theelectromagnetic radiation. As illustrated, detector elements 110 mayform a linear array detector on edge 125.

Optical analysis device 100 may also include a substrate layer 102, aprocessor 111 and a memory 112. Substrate layer 102 is electricallycoupled with 2D waveguide layer 101 through conducting lines 107 andreceives the signal in processor 111 from each of detector elements 110.Processor 111 forms a spectrum of electromagnetic radiation 105 andstores the spectrum in memory 112.

Substrate layer 102 may also include a device identifier 115. In someembodiments, device identifier 115 includes a radio-frequency (RF)identification (RFID) circuit, an RF antenna, or a near-field contact(NFC) circuit, so that optical sensing device 100 may be remotely, orwirelessly identified by an external device. Moreover, device identifier115 may also be configured to wirelessly provide to an external devicedata including the spectrum obtained with detector elements 110,processed with processor 111, and stored in memory 112.

In some embodiments, 2D waveguide layer 101 includes trenches 120specifically located and oriented in order to direct output light intodesigned focal points along edge 125 according to wavelength. In someembodiments, trenches 120 include millions of features disposed on 2Dwaveguide layer 101 according to a computer-designed DPH spectrometer.In some embodiments, trenches 120 may include subwavelength featuresselected to generate an orientation dependent diffraction pattern ofelectromagnetic radiation 105. Two-dimensional waveguide layer 101 maybe formed of a material substantially transparent to the propagation ofelectromagnetic radiation 105 at the wavelengths of interest. In someembodiments, for instance, 2D waveguide layer 101 may be formed withsilicon dioxide or hafnium dioxide.

Trenches 120 may be formed or otherwise defined onto 2D waveguide layer101 using electron beam lithography and dry etching. Alternatively, theetching technique used to form trenches 120 may be any etching techniqueknown in the art that is compatible with the material in 2D waveguidelayer and the feature dimensions of trenches 120 (e.g., width anddepth). Some embodiments of optical analysis device 100 may include upto a thousand (1000) detector elements 110 for electromagnetic radiation105 having a spectrum centered at a wavelength of 660 nm.

In operation, electromagnetic radiation 105 enters 2D waveguide layer101 through optical input 130 and is diffracted from trenches 120 as afunction of wavelength. 2D waveguide layer 101 acts as a dispersivespectrometer when optically coupling electromagnetic radiation 105 tooptical input 130 and detector elements 110. In some embodiments,electromagnetic radiation 105 may be coupled to 2D waveguide layer 101by a fiber optic cable (e.g., a single-mode or a multi-mode fiber) orany other compact waveguide device. 2D waveguide layer 101 may provide aspectrum along edge 125 having a resolution between about 0.1 nm toabout 0.5 nm and over a broad spectral range (500-1000 nm). In someembodiments, 2D waveguide layer 101 may be configured to provide spectraacross a wavelength range between 600 nm-690 nm, a wavelength rangebetween 590 nm-690 nm, a wavelength range between 760 nm-920 nm, and acombination of wavelength ranges between 630 nm-690 nm and 760 nm-850nm. Moreover, 2D waveguide layer 101 may include trenches 120 selectedto provide a spectrum in a NIR wavelength range (e.g., a wavelengthrange included between 750 nm-2500 nm).

In some embodiments, 2D waveguide layer 101 may have a reduced formfactor of only a few tenths of an inch, leading to an optical analysisdevice 100 that has a form factor of about an inch by each side, or evenless. Accordingly, optical analysis device 100 may have much smallerdimensions as compared to traditional dispersive spectrometers havingsimilar spectral resolution. This is due to the accrued diffractioneffect of the millions of features of trenches 120 as electromagneticradiation 105 propagates forward and backward through 2D waveguide layer101. In contrast, traditional spectrometers are larger (about a fewinches on the side) due to the need for a longer optical path lengthfrom a grating or within a prism to obtain the desired wavelengthdispersion. The compactness of optical sensing device 100 allows someembodiments to be utilized in permanent downhole sensors and toincorporate optical sensing device 100 with existing oil and gas serviceequipment for spectral data acquisition. More specifically, a compactoptical sensing device 100 may be mounted in a thermos-type containerforming a reduced size tool that is able to operate in the hostiledownhole temperatures (typically 200□C or even more).

While 2D waveguide layer 101 is shown as a generally planar construct,it is understood that embodiments consistent with the present disclosuremay include any 2D surface adapted to a volumetric object (e.g., aportion of a cylinder, a sphere, or a volume having an arbitrary shape).Moreover, 2D waveguide layer 101 may have any planar shape other thanthe square illustrated in FIG. 1. For example, edge 125 may have anypolygonal orientation relative to optical input 130.

Optical analysis device 100 may be used in measuring while drilling(MWD) or logging while drilling (LWD) applications, due to itscompactness and the fact that there are no moving parts involved in thespectral collection. Embodiments lacking movable parts have theadditional advantage in drawing lower operation power as compared withother devices having motors and actuators to activate shutters and thelike. Accordingly, some embodiments include an integrated battery orfuel cell (not shown) coupled to substrate layer 102 to power thedevice, lasting for long periods of time. Embodiments of tools includingoptical analysis device 100 are free of shutters, motors, and the needfor optical alignment, thus being advantageous in the oil and gasindustry for their mechanical reliability and power efficiency.

In-situ spectra obtained with optical sensing device 100 may be used tocollect raw data in case a hydrocarbon product in a wellbore orreservoir does not match a fluid in an existing database. Also, opticalsensing device 100 may be used to obtain raw data in situations wherethe hydrocarbon product or fluid in the wellbore or reservoir is amultiphase fluid mixture also not available in an existing database.Thus, the spectral data recorded with optical sensing device 100 may beincorporated to a calibration database updated with the new fluid. Insome embodiments, optical analysis device 100 collects a spectrum inonly a few milliseconds (ms), thereby enabling a tool to perform fluidcharacterization in-situ, in real time.

FIG. 2 illustrates an exemplary tool 200 that may incorporate opticalanalysis device 100, according to one or more embodiments. Asillustrated, tool 200 may be attached to an integrated characterizationsection (ICS) 270 in a flow line. Tool 200 may be packaged and otherwiseconfigured to be conveyed downhole for various wellbore monitoringapplications. For example, in some embodiments, tool 200 may be attachedto or form part of a logging tool and conveyed downhole on wireline,slickline, or another similar type of conveyance. In other embodiments,tool 200 may be attached to or included in a drilling application andconveyed downhole as part of a logging while drilling (LWD) tool. ICS270 includes a first ICS sensor 221 and a second ICS sensor 222separated by a link 203. Without loss of generality, first ICS sensor221 is positioned on the “downhole” side of link 203 (i.e., the side oflink 203 closest to the toe or bottom of the wellbore), and second ICSsensor 222 is positioned on the “surface” side of link 203 (i.e., theside of link 203 closest to the surface).

A first fluid cell 205 and a second fluid cell 206 included in tool 200collect wellbore fluid for measurement in first ICS sensor 221 and insecond ICS sensor 222, respectively. Optical analysis devices 100 aresuitably located in first and second fluid cells 205 and 206 andsimultaneously measure a fluid spectrum in parallel to ICS sensors 221and 222. Some embodiments include a light source 201 in proximity toeach optical analysis device 100 to provide electromagnetic radiation105 (FIG. 1). Optical analysis devices 100 may also or alternatively beoptically coupled to fluid cells 205 and 206 through optical fibers, sothat fluid cells 205 and 206 may be spaced apart from optical analysisdevices 100. A power transformer 220 provides power to ICS sensors 221and 222 and may also provide power to light sources 201 and opticalanalysis devices 100.

FIG. 3 illustrates another exemplary tool 300 that may incorporate orotherwise include optical analysis device 100 of FIG. 1, according toone or more embodiments. As illustrated, tool 300 may be attached to afluid identification (FLID) section 370. Similar to tool 200 of FIG. 2,tool 300 may be packaged and otherwise configured to be conveyeddownhole for various wellbore monitoring applications. In someembodiments, for instance, tool 300 may be attached to or form part of alogging tool and conveyed downhole on wireline, slickline, or anothersimilar type of conveyance. In other embodiments, tool 300 may beattached to or included in a drilling application and conveyed downholeas part of a logging while drilling (LWD) tool FLID section 300 includesa fluid temperature sensor 310, a pressure sensor 320, a density meter330 (“densitometer”), a resistivity sensor 340, and a capacitance sensor350 in addition to optical analysis device 100. The small form factor ofoptical analysis device 100 allows it to be included in FLID section 300without any or significant re-tooling and with low impact in the powerconsumption of the section.

FIG. 4A illustrates a tool string 400A including optical analysis device100 of FIG. 1, according to one or more additional embodiments. Toolstring 400A may be a part of a reservoir description tool (i.e., RDT™available from Halliburton Energy Services of Houston, Tex.) or a GEOTAP® device used in the oil and gas industry (e.g., in wireline logging,MWD or LWD applications. Because of its small form factor, opticalanalysis device 100 may be added as a component to any one of thevarious RDT™ tools in tool string 400A. Without limitation, tool string400A includes a flow control pump-out section (FPS) 402, a quartz gaugesection (QGS) 404, a straddle packer section (SPS) 406, and amulti-chamber sample collection module (MCS) 408. Each of sections 402,404, 406 and module 408 may include at least one optical analysis device100 to collect a spectrum of a sample of the fluid transiting througheach section/module.

Some embodiments include optical analysis device 100 attached to anoptical probe 470 especially dedicated to the collection of spectraldata. Optical probe 470 may include a plurality of optical analysisdevices 100 arranged radially around a central portion where a fluidconduit carries the sample flow. Each of optical analysis devices 100 inoptical probe 470 may be configured to collect a spectrum in a differentwavelength range. Further, optical probe 470 may include a hollowcylindrical portion made of a strong, transparent material such assapphire. The hydrocarbon fluid passes at the center of the hollowcylindrical portion, and optical analysis devices 100 may be arrangedradially on the hollow cylindrical portion with a sensor edge (e.g.,edge 125 of FIG. 1) along the cylindrical axis. In some embodiments,optical analysis devices 100 and the hollow cylindrical sapphire portionform a fin-like structure in probe 470.

In some embodiments, the compactness of optical analysis device 100enables it to be positioned close to pads used as fluid entry points ofsections 402, 404, 406, and module 408. This in turn is beneficial forfluid characterization because trace amounts of contaminants and otherfluid components of interest may be adsorbed to the metal structure andwalls of sections 402, 404, 406, and of module 408. Thus, measurementsof trace contaminants and components may be more accurate if performednear or at fluid entry points of sections 402, 404, 406 and module 408.

FIG. 4B illustrates another exemplary tool string 400B including opticalanalysis device 100 of FIG. 1, according to one or more additionalembodiments. Similar to the tool string 400A of FIG. 4A, tool string400B includes FPS 402, QGS 404, SPS 406, and MCS 408. Tool string 400Bfurther includes dual probe section (DPS) 412 and oval pad section (OPS)414. In some embodiments, as illustrated, tool string 400B may alsoinclude optical probe 470, as described above.

A plurality of optical analysis devices 100 in different sections oftool strings 400A and 400B may determine sections where the fluidincludes a liquid phase, a foam phase, and a gas phase. Accordingly,tools strings 400A and 400B may determine when a break out into multiplephases occurs in the fluid flow. Thus, based on measurements provided bytool strings 400A and 400B, an operator of a wellbore may takecorrective actions to ensure single-phase hydrocarbon flow when this isdesirable. Moreover, the wellbore operator may desire to extract thehydrocarbon product as fast as possible up to a point in which toolstring 400A or 400B reports a break out of the fluid. To increasesensitivity to fluid break out, some embodiments of a tool string asdisclosed above may include optical analysis devices 100 disposedradially on the optical probe 470 section. In this configuration, toolstrings 400A and 400B are sensitive to break out between the bottom of ahorizontal pipeline and the top portion of the horizontal pipeline.

FIG. 5 illustrates another exemplary tool 500 including optical analysisdevice 100, according to one or more embodiments. Without limitation,tools 200, 300, 400A, 400B and 500 in FIGS. 2-5 may be used in variouswellbore monitoring applications and conveyed downhole as part of adrilling assembly or otherwise on wireline, slickline, or anothersimilar type of conveyance. As illustrated, tool 500 may be attached toan enhanced probe section (EPS) 570 for wellbore applications. EPS 570slides within wellbore 518 through a formation 520 using supports 519and pads 530. EPS 570 receives an intake of formation fluid 550 throughpads 530 fluidically coupled with a conduit 515. EPS 570 may be as DPS412 (cf. FIG. 412), where a dual sensor includes two versions of thesame sensor (e.g., two optically based devices). More generally, EPS 570may include an enhanced ICE-based device 501 configured to measure adifferent optical property of the fluid compared to optical analysisdevice 100. Optical analysis device 100 is positioned along the path offormation fluid 550 in conduit 515 to obtain a spectrum of formationfluid 550. In some embodiments, an optical analysis device as disclosedherein may be configured to obtain an estimation of mud filtratecontamination in formation fluid 550. Some embodiments of EPS 570include an optical analysis device having an integrated computationalelement (ICE), or ICE-based optical analysis device 501. An ICE is anoptical element configured to return an interacted electromagneticradiation with an intensity proportional to the result of a multivariateregression operation to identify or quantify a desired characteristic ofa sample. In some embodiments, an ICE may include a plurality ofalternating layers of two dielectric materials having different indicesof refraction. In such embodiments, the thickness and number of thelayers in the ICE may be selected according to a regression vector ofthe desired characteristic of the sample. ICE-based device 501 may be amicro-ICE configuration including a microfluidic circuit to sample atleast a portion of formation fluid 550. In some embodiments, ICE-baseddevice 501 and optical analysis device 100 may share a light source togenerate electromagnetic radiation 105.

Optical analysis device 100 may supplement ICE-based device 501 withspectral data, for use in combination with an ICE signal to measure asample characteristic. In some embodiments, optical analysis device 100may be used by itself to provide a different sample characteristic fromthat obtained with ICE-based device 501.

FIG. 6 illustrates an intelligent well completion (IWC) system 600 thatmay incorporate the principles of the present disclosure. Asillustrated, IWC system 600 may have a plurality of components 601 a-i(hereinafter collectively referred to as components 601), including aplurality of optical analysis devices 100 attached to a probe 670arranged at a distal end of IWC system 600. IWC system 600 is introducedinto a wellbore 618 from derrick 605, at a surface location 607. Withoutlimitation, surface location 607 may be the surface of solid ground, ofan ice core (e.g., in a polar oil and gas production environment), or ofa body of water (in an underwater oil and gas production environment).Components 601 may include a plurality of tools and components such assafety valve 601 a, heavy weight ballast tubing 601 b, conventional gaslift valves 601 c, a sliding side door 601 d, a production packer 601 e,internal and external swell packers 601 f, permanent gauges 601 g, adistributed temperature system 601 h, and internal control valves 600 i.In some embodiments, optical analysis devices 100 are distributed alongdiscrete locations within or nearby any one of the plurality of toolsand components in IWC 600.

Internal control valves 600 i partition probe 670 into a plurality ofzones 622 a-d (hereinafter collectively referred to as zones 622). Eachzone 622 may include at least one optical analysis device 100. Opticalanalysis devices 100 collect spectra of fluids from individual zones622. In some embodiments, at least one optical analysis device 100collects spectrum from the combined fluid at production packer 600 d.

FIG. 7 illustrates a tool 700 including a plurality of self-containedoptical analysis devices 710 removably attached to a probe 770 in awellbore 718. Self-contained optical analysis device 710 includes amicrofluidic circuit 702 coupled with 2D waveguide layer 101 (cf. FIG.1). Probe 770 is lowered into wellbore 718. In some embodiments, probe770 is loaded with air at a pre-selected pressure to reach apre-determined depth in wellbore 718. Wellbore 718 may be an open andactive wellbore, a cased and inactive wellbore, or a reservoircontainer. In operation, device 710 may be configured to detach fromprobe 770 at a pre-selected depth and enter the fluid flow stream (or astagnant fluid) in wellbore 718. Thus, a portion of wellbore fluid 750enters a microfluidic circuit 702 (e.g., by capillary action) to beinteracted with electromagnetic radiation 105 (FIG. 1) emitted by lightsource 701. A processor 711 collects the signals from 2D waveguide layer101 and forms a spectrum that is stored in a memory 712. Devices 710detach from probe 770 at pre-determined depths and move up to thesurface of wellbore 718, where they may be collected for dataextraction.

Each self-contained optical analysis device 710 is lightweight ordesigned for positive buoyancy in fluid 750 so that it is able to reachthe surface of wellbore 718 shortly after detachment from probe 770.Self-contained optical analysis device 710 is later retrieved and thedata extracted from memory 712 for analysis. In some embodiments,interacted light 105 is coupled into 2D waveguide layer 101 by fiberoptics or a similar waveguide mechanism.

FIG. 8 illustrates a tool 800 including a plurality of optical analysisdevices 100 attached to a probe 870. In some embodiments, probe 870 alsoincludes at least one or a plurality of light sources 801 to provideelectromagnetic radiation 105 (FIG. 1) for each optical analysis device100. Without loss of generality, probe 870 may include a smart,self-propelled tool such as a “snake” tool including a plurality ofinterconnected links 805. More generally, probe 870 may be any type ofsubmersible robot configured to descend a specified depth within awellbore or a container. Links 805 may be joined through bladders 809having a selected density to control the buoyancy of tool 800, therebyadjusting a desired depth reached in a wellbore or reservoir formeasurement or a desired speed of submersion of tool 800. In someembodiments, as illustrated, each interconnected link 805 may include awheel 807 that allows probe 870 to move along against a wellbore wall,or a pipeline wall, or a container wall.

In some embodiments, probe 870 may be configured to descend or otherwisebe immersed to a selected depth inside a wellbore or reservoir. One ormore of optical analysis devices 100 may further include a pressuresensor 803. In some embodiments, probe 870 moves along a wall of apipeline or container in the wellbore or reservoir and collects spectra,while also recording the depth at which each spectrum is collected.Accordingly, processor 111 (FIG. 1) in optical analysis device 100determines an immersion depth associated with the collected spectrum(e.g., using a pressure measurement), and memory 112 (FIG. 1) stores thespectrum and the immersion depth. In some embodiments, tool 800 isconfigured moves up and down along the wellbore or reservoir whiletransmitting data collected by optical analysis device 100 at differentdepths to the surface of the wellbore or reservoir. Tool 800 may beconfigured to transmit data acoustically, or wirelessly using RFsignaling. Examples of material characterization that may be performedwith tool 800 for well abandonment include, without limitation,detection and quantification of a gas (e.g., air), a liquid (e.g., wateror crude oil leaking into the reservoir), or a solid such as a wax,scale, corrosion, and bacterial contamination.

Probe 870 may include other types of smart self-propelled sensorplatforms for autonomous well monitoring and/or well abandonment. Fluidcan by pumped to a fluid sampling cell (e.g., microfluidic circuit 702)periodically to sample for the presence of fluid components.

FIG. 9 illustrates a plurality of optical analysis devices 100 a-e(collectively referred to as optical analysis devices 100) linked inseries and otherwise in a network 900 for distributed sensing. Network900 includes at least one light source 901 to provide electromagneticradiation 105 (FIG. 1) for each of optical analysis devices 100. Network900 further includes an optical link 903 that couples electromagneticradiation 105 through the optical input 130 (FIG. 1) in each opticalanalysis device 100 from light source 901.

Embodiments using fiber optic for optical link 903 enable distributedsensing with optical analysis devices 100 over a long distance in awellbore. For example, in some embodiments, optical analysis device 100a may be located near or at the bottom or the toe of the wellbore, andoptical analysis device 100 e may be located near or at the surface ofthe wellbore. In some embodiments, network 900 for distributed sensingmay be applied to oil and gas transportation piping.

Optical sensing devices 100 are compact, continuously monitoring sensorsthat can provide fluid data at specific sample points and times. Thus,network 900 may be used to correlate fluid characteristics betweensample points at different locations in the pipeline, such ascomposition and flow velocity, among others. These measurements may beuseful for flow characterization such as in a turbulent flow, or a breakout point.

At the top of a horizontal pipeline, optical analysis devices 100 innetwork 900 may monitor a profile of a wax deposited in the interiorsurface of the horizontal pipeline by measuring a change in thesaturates composition between different points along the pipeline. Morewater at a first point and less water at a second point downstream ofthe pipeline may indicate that hydrates (e.g., wax) have been deposited.In contrast, material characterization at the bottom of the pipeline maydetect scale deposition (e.g., inorganic scales). Inorganic scales mayinclude minerals deposited from water such as, but not limited to,calcium carbonate (CaCO3), calcium sulfate (CaSO4), barium sulfate(BaSO4), strontium sulfate (SrSO4), salt (NaCl), and the like.Accordingly, upon detection of these undesirable pipeline conditions, anoperator may have maintenance or remediation procedures performed on thepipeline, such as introducing dehydrating substances and other hydrateinhibitors or descaling treatment fluids to the fluid flow.

FIG. 10 illustrates a drilling system 1000 configured to use an opticalanalysis device for modifying a drilling parameter inmeasurement-while-drilling (MWD) and logging-while-drilling (LWD)operations. Boreholes may be created by drilling into the earth 1002using the drilling system 1000. The drilling system 1000 may beconfigured to drive a bottom hole assembly (BHA) 1004 positioned orotherwise arranged at the bottom of a drill string 1006 extended intothe earth 1002 from a derrick 1008 arranged at the surface 1010. Thederrick 1008 includes a kelly 1012 and a traveling block 1013 used tolower and raise the kelly 1012 and the drill string 1006.

The BHA 1004 may include a drill bit 1014 operatively coupled to a toolstring 1016 which may be moved axially within a drilled wellbore 1018 asattached to the drill string 1006. During operation, the drill bit 1014penetrates the earth 1002 and thereby creates the wellbore 1018. The BHA1004 provides directional control of the drill bit 1014 as it advancesinto the earth 1002. The tool string 1016 can be semi-permanentlymounted with various measurement tools (not shown) such as, but notlimited to, measurement-while-drilling (MWD) and logging-while-drilling(LWD) tools, that may be configured to take downhole measurements ofdrilling conditions. In other embodiments, the measurement tools may beself-contained within the tool string 1016, as shown.

Fluid or “mud” from a mud tank 1020 may be pumped downhole using a mudpump 1022 powered by an adjacent power source, such as a prime mover ormotor 1024. The mud may be pumped from the mud tank 1020, through astand pipe 1026, which feeds the mud into the drill string 1006 andconveys the same to the drill bit 1014. The mud exits one or morenozzles arranged in the drill bit 1014 and in the process cools thedrill bit 1014. After exiting the drill bit 1014, the mud circulatesback to the surface 1010 via the annulus defined between the wellbore1018 and the drill string 1006, and in the process, returns drillcuttings and debris to the surface. The cuttings and mud mixture arepassed through a flow line 1028 and are processed such that a cleanedmud is returned down hole through the stand pipe 1026 once again.

The BHA 1004 may further include a downhole tool 1030 similar to thedownhole tools described herein. More particularly, downhole tool 1030may include optical analysis device 100, as disclosed herein (cf. FIG.1). Downhole tool 1030 may be controlled from the surface 1010 by acomputer 1040 having a memory 1042 and a processor 1044. Accordingly,memory 1042 may store commands that, when executed by processor 1044,cause computer 1040 to perform at least some steps in methods consistentwith the present disclosure.

FIG. 11 illustrates a wireline system 1100 configured to use acalibrated optical sensor during formation testing and sampling. In someembodiments, wireline system 1100 may be configured to use a formationtester and calibrated optical tool in determining types of formationfluids and the associated characteristics through sampling afterdrilling of wellbore 1018 is complete. System 1100 may include adownhole tool 1102 that forms part of a wireline logging operation thatcan include one or more optical analysis devices 100, as described withreference to FIG. 1. System 1100 may include the derrick 808 thatsupports the traveling block 1013. Wireline logging tool 1102, such as aprobe or sonde, may be lowered by wireline or logging cable 1106 intothe borehole 1018. Tool 1102 may be lowered to the potential productionzone or the region of interest in the wellbore, and used in conjunctionwith other components of the formation tester such as packers and pumpsto perform well testing and sampling. Optical analysis device 100 may beconfigured to measure optical responses of the formation fluids, and anymeasurement data generated by downhole tool 1102 and its associatedoptical analysis device 100 can be real-time processed fordecision-making, or communicated to a surface logging facility 1108 forstorage, processing, and/or analysis. Logging facility 1108 may beprovided with electronic equipment 1110, including processors forvarious types of signal processing.

FIG. 12 illustrates a flow chart of steps in a method 1200 for adjustinga wellbore operation or a storage procedure based on a measurementprovided by an optical analysis device attached to a probe in a tool(e.g., optical analysis devices 100 and 710, probes 270, 370, 570, 670,770, 870, and tools 200, 300, 400A,B, 500, 600, 700 and 800, cf. FIGS.2, 3, 4A, 4B, 5, 6, 7, 8 and 9). In some embodiments, the opticalanalysis device includes a 2D waveguide layer configured to transmit anddisperse an electromagnetic radiation according to wavelength, andincludes a plurality of detector elements disposed along an edge (e.g.,electromagnetic radiation 105, detector elements 110, edge 125, cf. FIG.1). The optical analysis device may further include a substrate layerelectrically coupled to the 2D waveguide layer to receive the signalfrom each of the detector elements, form a spectrum of theelectromagnetic radiation with a processor, and store the spectrum in amemory (e.g., 2D waveguide layer 101, processor 111 and memory 112, cf.FIG. 1). The memory may include commands which, when executed by theprocessor, cause the optical analysis device to perform at least some ofthe steps in method 1200. The substrate layer may further include adevice identifier so that the optical sensing device is remotely, orwirelessly identified by an external device (e.g., device identifier115, cf. FIG. 1).

Embodiments consistent with method 1200 may include some but not all ofthe steps illustrated in FIG. 12. Moreover, in some embodiments steps inmethods consistent with method 100 may be performed in a differentsequence, or even overlapping at least partially in time with oneanother. Further, in some embodiments methods consistent with method1200 may include any two or more of steps 1202 through 1212 performedsimultaneously or almost simultaneously.

Step 1202 includes deploying the probe in a wellbore, a pipeline or areservoir, the probe including an optical analysis device. Step 1204includes adjusting a depth or position of measurement for the probe.Step 1206 includes obtaining a spectrum with the optical analysis deviceat a specified depth. In some embodiments, step 1206 includes providingan electromagnetic radiation to be interacted with a fluid in thewellbore or reservoir. Step 1206 may further include coupling theinteracted electromagnetic radiation to the optical analysis device.Step 1206 may include releasing the optical analysis device into thewellbore or the reservoir at the specified depth and storing in a memoryof the optical analysis device a value for the specified depthassociated with the obtained spectrum. Further, step 1206 may includeretrieving the optical analysis device from the wellbore or thereservoir. Alternatively, step 1206 may include transmitting the valueof the specified depth associated with the obtained spectrum and theobtained spectrum itself to the surface via an electronic signal, or anacoustic signal through the fluid or the wireline in wireline, LWD orMWD applications.

Step 1208 includes storing the spectrum and the specified depth in amemory. In some embodiments, the probe includes an integratedcharacterization section (ICS) configured to measure a fluid density anda fluid pressure and step 1208 includes associating the fluid densityand the fluid pressure to the stored spectrum. Step 1008 may includeproviding the spectrum and the specified depth to an operator remotely,or wirelessly using one of a radio-frequency antenna or a near fieldcontact (NFC) circuit in the optical analysis device, or an acousticdata transmission through the fluid in the wellbore, pipeline orreservoir.

Step 1210 includes obtaining a characteristic of a fluid, a formation inthe wellbore, a fluid flow in the pipeline or a container in thereservoir. The reservoir may be a cased or unused wellbore, and thecontainer in the reservoir may include a storage device or a drumlocated downhole. More generally, the reservoir may be a body of fluideither in a subterranean formation or otherwise. Accordingly, thecontainer in the reservoir may be a drum, a tank, a cement wall, or awellbore casing. In some embodiments, step 1210 includes performing amultivariate regression analysis using the spectrum. Further, in someembodiments step 1210 includes performing a neural network analysisusing the stored spectrum to obtain the characteristic of at least onefluid, or a condition of the wellbore, the pipeline, or the reservoir.

Step 1212 includes adjusting a wellbore or pipeline operation or areservoir storage based on either one of the characteristic of thefluid, the formation in the wellbore, and the reservoir container. Insome embodiments, adjusting the wellbore operation or the reservoirstorage in step 1212 includes modifying a fluid in the wellbore or inthe reservoir. Moreover, modifying a fluid in the wellbore or in thereservoir includes removing the fluid from the wellbore or thereservoir. For example, in some embodiments step 1212 includes adding ananti-bacterial additive to a hydrocarbon reservoir when the presence ofbacteria is detected according to the characteristic obtained from astored spectrum. In some embodiments, step 1212 includes adjusting aflow parameter in a pipeline operation. For example, step 1212 mayinclude adjusting a pumping rate to modify a flow speed in the pipeline.Step 1212 may include reducing a pumping rate to avoid a break out pointin the fluid flow, or increasing the pumping rate to enhance productionwhen no break out point is detected. In some embodiments, adjusting areservoir storage based on the characteristic obtained may includeremoving a wellbore or a section of the well bore from production,removing the fluid in a cased wellbore, flooding the cased wellbore witha fluid (e.g., water or gas), or re-opening the wellbore for oil and gasproduction.

In some embodiments, the probe includes a submersible robot and theoptical analysis device includes a pressure sensor in the substratelayer. Accordingly, method 1000 may further include receiving by theprocessor in the substrate layer a fluid pressure value from thepressure sensor, and determining, with the processor, the specifieddepth for a spectrum obtained with the optical analysis device.

Embodiments disclosed herein include:

A. A tool, including a probe deployable within a wellbore and an opticalanalysis device coupled to the probe. The optical analysis deviceincludes a two-dimensional (2D) waveguide layer to transmit and todisperse electromagnetic radiation according to wavelength, the 2Dwaveguide layer including a plurality of detector elements disposedalong an edge of the 2D waveguide layer so that each detector elementprovides a signal associated with a pre-determined wavelength portion ofthe electromagnetic radiation. The optical analysis device also includesa substrate layer including a processor and a memory. The substratelayer being electrically coupled to the 2D waveguide layer to receivethe signal from each detector element and form a spectrum of theelectromagnetic radiation with the processor.

B. A method, including deploying a probe in one of a wellbore or areservoir, the probe including an optical analysis device having atwo-dimensional (2D) waveguide layer that transmits and disperseselectromagnetic radiation according to wavelength. The method alsoincludes adjusting a depth of measurement for the probe and obtaining aspectrum with the optical analysis device at a specified depth. Themethod may also include obtaining a characteristic of at least one of afluid, a formation in the wellbore, or of a container in the reservoir,and adjusting one of a wellbore operation or a reservoir storage basedon the characteristic.

C. A non-transitory, computer readable medium storing commands which,when executed by a processor in a tool, cause the tool to perform amethod, the method including deploying a probe in one of a wellbore or areservoir, the probe including an optical analysis device, the opticalanalysis device including a two-dimensional (2D) waveguide layerconfigured to transmit and disperse an electromagnetic radiationaccording to wavelength. The method may also include adjusting a depthof measurement for the probe and obtaining a spectrum with the opticalanalysis device at a specified depth. The method may also includeobtaining a characteristic of at least one of a fluid, a formation inthe wellbore, or a container in the reservoir, and adjusting one of awellbore operation or a reservoir storage based on the characteristic ofat least one of the fluid, the formation in the wellbore, or thecontainer in the reservoir. In some embodiments, the adjusting thewellbore operation of the reservoir storage includes modifying a fluidin the wellbore or in the reservoir.

Each of embodiments A, B, and C may have one or more of the followingadditional elements in any combination. Element 1, wherein the opticalanalysis device is removably coupled to the probe. Element 2, furtherincluding a microfluidic device coupled with the optical analysis deviceto provide a fluid sample to interact with the electromagnetic radiationprior to transmitting the electromagnetic radiation to the 2D waveguidelayer. Element 3, further including a light source optically coupledwith the optical analysis device to provide the electromagneticradiation. Element 4, further including a microfluidic device and alight source coupled to the optical analysis device to form aself-contained optical device, the self-contained optical device beingremovably coupled to the probe. Element 5, wherein the optical analysisdevice further includes a pressure sensor, and wherein the probedescends to a selected depth inside the wellbore and the processordetermines an immersion depth associated with the spectrum, and thememory stores the spectrum and the selected depth. Element 6, whereinthe optical analysis device comprises a plurality of optical analysisdevices and the probe includes a plurality of interval control valvesseparating the probe into a plurality of zones, and wherein each zoneincludes at least one of the plurality of optical analysis devices.Element 7, wherein the optical analysis device comprises a plurality ofoptical analysis devices forming a network, and wherein the networkincludes a light source and an optical link that provides theelectromagnetic radiation for each of the plurality of optical analysisdevices from the light source. Element 8, wherein the optical analysisdevice further includes an identification circuit including at least oneof a radio-frequency identifying tag, a radio-frequency antenna, and anear field contact circuit.

Element 9, wherein the probe includes a submersible robot and theoptical analysis device includes a pressure sensor and a processor, themethod further including receiving a fluid pressure value at theprocessor from the pressure sensor and determining the specified depthwith the processor. Element 10, wherein obtaining a spectrum with theoptical analysis device includes: providing interacting theelectromagnetic radiation with a fluid in the wellbore or the reservoir;and providing the interacted electromagnetic radiation to the opticalanalysis device. Element 11, wherein obtaining a spectrum with theoptical analysis device includes: releasing the optical analysis deviceinto the wellbore or the reservoir at the specified depth, storing inthe memory a value for the specified depth associated with the obtainedspectrum, and retrieving the optical analysis device from the wellboreor the reservoir. Element 12, wherein obtaining a characteristic of thefluid, the formation in the wellbore, or the container in the reservoirincludes performing a multivariate regression analysis using thespectrum. Element 13, further including: measuring a fluid density and afluid pressure with an integrated characterization section included inthe probe, storing the spectrum and the specified depth in the memoryand associating the fluid density and the fluid pressure to thespectrum. Element 14, wherein storing the spectrum and the specifieddepth in the memory includes providing the spectrum and the specifieddepth to an operator using one of a radio-frequency antenna or a nearfield contact circuit in the optical analysis device. Element 15,wherein the reservoir is a subterranean reservoir including a casedwellbore, and adjusting a reservoir storage comprises one of reinforcinga wellbore casing or emptying the fluid content in the cased wellbore.Element 16, further including at least one of storing the spectrum andthe specified depth in a memory, and transmitting the spectrum and thespecified depth to a surface of the wellbore or the reservoir.

Element 16, wherein modifying a fluid in the wellbore or in thereservoir includes removing the fluid from the wellbore or thereservoir. Element 17, wherein obtaining a characteristic of a fluid, aformation in the wellbore, or a container in the reservoir includesperforming a multivariate regression analysis with the spectrum. Element18, wherein adjusting a depth of measurement for the probe includesmeasuring a fluid pressure with a pressure meter in the probe, andconverting the fluid pressure into the depth of measurement with theprocessor in the tool.

By way of non-limiting example, exemplary combinations applicable toembodiments A, B, and C include: Element 1 with Element 2; Element 10with Element 11, and Element 17 with Element 18.

Those skilled in the art will readily appreciate that the methodsdescribed herein or large portions thereof may be automated at somepoint such that a computerized system may be programmed to transmit datafrom an optical analysis device as disclosed herein. Computer hardwareused to implement the various methods and algorithms described hereincan include a processor configured to execute one or more sequences ofinstructions, programming stances, or code stored on a non-transitory,computer-readable medium. The processor can be, for example, a generalpurpose microprocessor, a microcontroller, a digital signal processor,an application specific integrated circuit, a field programmable gatearray, a programmable logic device, a controller, a state machine, agated logic, discrete hardware components, an artificial neural network,or any like suitable entity that can perform calculations or othermanipulations of data. In some embodiments, computer hardware canfurther include elements such as, for example, a memory (e.g., randomaccess memory (RAM), flash memory, read only memory (ROM), programmableread only memory (PROM), electrically erasable programmable read onlymemory (EEPROM)), registers, hard disks, removable disks, CD-ROMS, DVDs,or any other like suitable storage device or medium.

Executable sequences described herein can be implemented with one ormore sequences of code contained in a memory. In some embodiments, suchcode can be read into the memory from another machine-readable medium.Execution of the sequences of instructions contained in the memory cancause a processor to perform the process steps described herein. One ormore processors in a multi-processing arrangement can also be employedto execute instruction sequences in the memory. In addition, hard-wiredcircuitry can be used in place of or in combination with softwareinstructions to implement various embodiments described herein. Thus,the present embodiments are not limited to any specific combination ofhardware and/or software.

As used herein, a machine-readable medium will refer to any medium thatdirectly or indirectly provides instructions to a processor forexecution. A machine-readable medium can take on many forms including,for example, non-volatile media, volatile media, and transmission media.Non-volatile media can include, for example, optical and magnetic disks.Volatile media can include, for example, dynamic memory. Transmissionmedia can include, for example, coaxial cables, wire, fiber optics, andwires that form a bus. Common forms of machine-readable media caninclude, for example, floppy disks, flexible disks, hard disks, magnetictapes, other like magnetic media, CD-ROMs, DVDs, other like opticalmedia, punch cards, paper tapes and like physical media with patternedholes, RAM, ROM, PROM, EPROM and flash EPROM.

Therefore, the present invention is well adapted to attain the ends andadvantages mentioned as well as those that are inherent therein. Theparticular embodiments disclosed above are illustrative only, as thepresent invention may be modified and practiced in different butequivalent manners apparent to those skilled in the art having thebenefit of the teachings herein. Furthermore, no limitations areintended to the details of construction or design herein shown, otherthan as described in the claims below. It is therefore evident that theparticular illustrative embodiments disclosed above may be altered,combined, or modified and all such variations are considered within thescope and spirit of the present invention. The invention illustrativelydisclosed herein suitably may be practiced in the absence of any elementthat is not specifically disclosed herein and/or any optional elementdisclosed herein. While compositions and methods are described in termsof “comprising,” “containing,” or “including” various components orsteps, the compositions and methods can also “consist essentially of” or“consist of” the various components and steps. All numbers and rangesdisclosed above may vary by some amount. Whenever a numerical range witha lower limit and an upper limit is disclosed, any number and anyincluded range falling within the range is specifically disclosed. Inparticular, every range of values (of the form, “from about a to aboutb,” or, equivalently, “from approximately a to b,” or, equivalently,“from approximately a-b”) disclosed herein is to be understood to setforth every number and range encompassed within the broader range ofvalues. Also, the terms in the claims have their plain, ordinary meaningunless otherwise explicitly and clearly defined by the patentee.Moreover, the indefinite articles “a” or “an,” as used in the claims,are defined herein to mean one or more than one of the element that itintroduces. If there is any conflict in the usages of a word or term inthis specification and one or more patent or other documents that may beincorporated herein by reference, the definitions that are consistentwith this specification should be adopted.

1. A tool comprising: a dispersive spectrometer to be disposed in awellbore and to detect electromagnetic radiation according towavelength, the dispersive spectrometer having a plurality of detectorelements disposed along a waveguide layer, and wherein each detectorelement is to detect the electromagnetic radiation associated with aportion of the wavelength of the electromagnetic radiation.
 2. The toolof claim 1, further comprising a substrate layer, wherein the substratelayer is electrically coupled to the waveguide layer.
 3. The tool ofclaim 2, wherein each detector element is disposed along an edge of thewaveguide layer so that each detector element is to detect theelectromagnetic radiation associated with a pre-determined wavelengthportion of the electromagnetic radiation.
 4. The tool of claim 1,further comprising a processor, wherein the processor is to receive asignal from each of the plurality of detector elements and form aspectrum of the electromagnetic radiation at a specified depth withinthe wellbore.
 5. The tool of claim 1, further comprising a probedeployable within the wellbore, wherein the probe includes thedispersive spectrometer.
 6. The tool of claim 5, wherein the dispersivespectrometer is removably coupled to the probe.
 7. The tool of claim 1,further comprising a microfluidic device coupled with the dispersivespectrometer to provide a fluid sample to interact with theelectromagnetic radiation.
 8. The tool of claim 1, comprising a lightsource coupled to the dispersive spectrometer to form a self-containedoptical device.
 9. The tool of claim 1, wherein the waveguide layer is atwo-dimensional waveguide layer.
 10. A method comprising: deploying aprobe in a subterranean environment, the probe including a dispersivespectrometer having a waveguide layer; dispersing electromagneticradiation according to wavelength; detecting, with the dispersivespectrometer, a spectrum of the electromagnetic radiation that hasinteracted with the subterranean environment; and determining acharacteristic of the subterranean environment based on the spectrum.11. The method of claim 10, wherein the dispersive spectrometer includesa plurality of detector elements disposed along the waveguide layer, andwherein detecting the spectrum of the electromagnetic radiationcomprises detecting, with each detector element, the electromagneticradiation associated with a portion of the wavelength of theelectromagnetic radiation.
 12. The method of claim 11, wherein eachdetector element is disposed along an edge of the waveguide layer. 13.The method of claim 10, further comprising modifying a fluid of thesubterranean environment based, at least in part, on the characteristic.14. The method of claim 10, wherein detecting, with the dispersivespectrometer, the spectrum of the electromagnetic radiation comprises:collecting a fluid sample from the subterranean environment; interactingthe electromagnetic radiation with the fluid sample; and providing theinteracted electromagnetic radiation to the dispersive spectrometer. 15.The method of claim 10, wherein the waveguide layer is two-dimensional.16. A system comprising: a tool to be disposed in a subterraneanenvironment, the tool comprising a dispersive spectrometer having aplurality of detector elements disposed along a waveguide layer that isto diffract the electromagnetic radiation according to wavelength,wherein each detector element is to detect the electromagnetic radiationassociated with a portion of the wavelength of the electromagneticradiation after the electromagnetic radiation has interacted with thesubterranean environment; a processor; and a computer-readable mediumhaving instructions stored thereon that are executable by the processorto cause the processor to: determine a characteristic of thesubterranean environment based on the detected electromagneticradiation.
 17. The system of claim 16, wherein each detector element isdisposed along an edge of the waveguide layer so that each detectorelement is to detect the electromagnetic radiation associated with apre-determined wavelength portion of the electromagnetic radiation. 18.The system of claim 16, wherein the tool comprises a microfluidic devicecoupled with the dispersive spectrometer to provide a fluid sample tointeract with the electromagnetic radiation.
 19. The system of claim 16,wherein the tool comprises a light source coupled to the dispersivespectrometer to form a self-contained optical device.
 20. The system ofclaim 16, wherein the waveguide layer is a two-dimensional waveguidelayer.